<template>
  <div id="app">
    <!--    <showImg></showImg>-->
    <!-- :message 就是子组件中props定义参数,通过这样的方式,在组件之间进行参数的传递 -->
    <!--:show2="fun2"-->
    <home :message="msg" :show="fun1" :show2="fun2" ></home>
    <hr>
    <h1>{{wahaha}}</h1>
    <input type="text" v-model="word">
  </div>
</template>

<script>
  export default {
    name: 'App',
    data() {
      return {
        wahaha: "哦呵呵",
        msg: "在这等等我去给你买个橘",
        word: ""
      }
    },
    methods: {
      fun1: function () {
        // alert(1);
        return "天气开始冷了,听说是第四次寒潮";
      },
      fun2: function (word) {
        this.word = word;
      }
    }
  }
</script>

<style>
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
  }
</style>
